﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVCTutorial.GUI.Web.ViewModels.Tests;

namespace MVCTutorial.GUI.Web.Controllers
{
	public class TestController
		: Controller
	{
		public ActionResult Index()
		{
			return RedirectToAction("CreateSgnorfey");
		}

		public ActionResult CreateSgnorfey()
		{
			ViewBag.Jeorfies = Jeorfy.GetAll();
			return View();
		}

		[HttpPost]
		public ActionResult CreateSgnorfey(Sgnorfey sgnorfey)
		{
			if (ModelState.IsValid) // Valida o objeto no servidor
			{
				
			}
			
			return RedirectToAction("Index");
		}

	}
}
